/*
 * @Description: 
 * @Author: zml
 * @Date: 2025-07-30 14:29:51
 * @LastEditors: zml
 * @LastEditTime: 2025-08-06 14:51:21
 */
const userList = [
  {
    username: "张三",
    password: "123456",
    token: 'zhangsan&&passsword=123456',
    permissions: ['/rolesystem/roleadmin', '/about', '/', '/rolesystem', '/system']
  },
  {
    username: "admin",
    password: "123456",
    token: 'admin&&passsword=123456',
    permissions: []
  }
]

export function login(parasData: any) {
  return new Promise((resolve, reject) => {
    setTimeout(() => {
      let userinfo = userList.find(items => parasData.token == items.token || (items.password === parasData.password && items.username === parasData.username))
      if (userinfo) {
        resolve({ code: 200, message: "成功", userinfo: userinfo });
      } else {
        resolve({ code: 500, message: "失败" });
      }
    }, 200);
  })
}

